﻿@model IEnumerable<BTKERP.Model.Shelf>

@{
    ViewBag.Title = "Shelf";
}
@section AdditionalJS
{
 <script type="text/javascript">

     function add() {
         window.location = "/Shelf/Create";
     }
 </script>

}
<h2>Shlef List</h2>

<input type="button" value="Create New" class="btn btn-green" onclick="add();"/>
<table class="display stylized">
    <tr>
        <th>
            Code
        </th>
        <th>
            Barcode
        </th>
        <th>
            Name
        </th>
        <th>
            Description
        </th>
        <th>
            Warehouse
        </th>
        <th>
            Levels
        </th>
        <th>
            Capacity
        </th>
        <th>
            Weight
        </th>
        <th>
            Length
        </th>
        <th>
            Width
        </th>
        <th>
            Height
        </th>
        <th>
            Thickness
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Code)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Barcode)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Description)
        </td>
        <td>
            @BTKERP.MVCWeb.AppCode.DataRefHelper.GetWarehouseById(item.WarehouseId)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Levels)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Capacity)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Weight)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Length)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Width)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Height)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Thickness)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.Id })
        </td>
    </tr>
}

</table>
